Day 25
Carleton College
Stat 220 - Spring 2026
Recall that shiny allows a user to interact with visuals/data by directly manipulating inputs
Open the following shinyapps and explore a little bit.
With the folks around you, discuss:
ui <- fluidPage(
sidebarLayout(
sidebarPanel(
textOutput("panel")
),
mainPanel(
tabsetPanel(
id = "tabset",
tabPanel("panel 1", "one"),
tabPanel("panel 2", "two"),
tabPanel("panel 3", "three")
)
)
)
)
server <- function(input, output, session) {
output$panel <- renderText({
paste("Current panel: ", input$tabset)
})
}




Add theme = bslib::bs_theme() to your ui() function, and bslib::bs_themer() to your server function to try out different options interactively
Minimize (don’t close!) app and notice code updating in console - bs_theme_update(). Copy code!
When happy,
Shiny apps need to be “connected” to RStudio or a remote RStudio server
You can deploy shiny apps online
Your app and files should be in their own folder and the entire folder is what you “deploy”. You do not want multiple app.R or .Rmd files in that folder!